check variant before version to decide rpm target and packager closes #7666 #7667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Check the ID and VARIANT_ID before relying on just the VERSION_ID from /etc/os-release. This is needed to disambiguate fedora from fedora coreos, where the VERSION_IDs (from /etc/os-release) will be the same, but if it's the coreos variant it should use rpm-ostree instead of yum.
Types of Changes
Bugfix
Verification
I tested this change on fcos 38, as listed in #7666, and it fixed the problem. I did not retest on other distros, but it makes sense that having the id/variant check take precedence over the version would not impact the other distros, as non-coreos distros will still fall thru to the subsequent conditionals.
Testing
Linked Issues
#7666
User-Facing Change
Further Comments
small change